package com.dh.collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo03 {
    public static void main(String[] args) {
        Collection collection = new ArrayList();// 多态
        collection.add("1");// 增加数据
        collection.remove("1");// 删除数据
        System.out.println(collection.size());// 有多少个分区


        Collection collection1 = new ArrayList();
        collection1.add(new Goods("卫龙", 2));
        collection1.add(new Goods("卫龙", 2));

    }
}
